package eol;
import static org.junit.Assert.*;

import org.junit.Test;


public class Reverse extends BasicTest {
    
    @Test
    public void testReverse() {
        assertEquals( "closure" +newline+ 
        				  "closure" +newline+ 
        		          "[5.0, 4.0, 3.0, 2.0, 1.0]"+newline,
        		          go( "let rev := fun( x, y ) "+newline+
        		        		  "      if null x then y else rev( tl x, hd x : y ) end if end fun ;"+newline+
        		        		  "let reverse := fun(x) rev(x, [] ) end fun;"+newline+
        		        		  "reverse( [ 1, 2,3,4,5] ) ;" ) ) ;
    }
 }
